<!doctype html>
<html lang="zh-CN">

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
  <title>水果识别</title>

  <!-- Bootstrap -->
  <link rel="stylesheet" href="bootstrap.min.css">

  <!-- HTML5 shim 和 Respond.js 是为了让 IE8 支持 HTML5 元素和媒体查询（media queries）功能 -->
  <!-- 警告：通过 file:// 协议（就是直接将 html 页面拖拽到浏览器中）访问页面时 Respond.js 不起作用 -->
  <!--[if lt IE 9]>
      <script src="https://cdn.jsdelivr.net/npm/html5shiv@3.7.3/dist/html5shiv.min.js"></script>
      <script src="https://cdn.jsdelivr.net/npm/respond.js@1.4.2/dest/respond.min.js"></script>
    <![endif]-->

  <style>
    img[src=""],
    img:not([src]) {
      opacity: 0;

    }

    .imgbox {
      width: 128px;
      height: 128px;
      border: 1px solid #ddd;
      border-radius: 5px;
      overflow: hidden;
      box-sizing: content-box;
      position: relative;
    }

    .imgbox>* {
      position: absolute;
      width: 100%;
      height: 100%;
    }

    .imgbox>span {
      font-size: 68px;
      z-index: -2;
      color: #ddd;
      text-align: center;
      line-height: 128px;
    }

    .imgbox>img {
      z-index: -1;
      object-fit: cover;
    }

    .imgbox>input {
      opacity: 0;
    }
  </style>
</head>

<body>
  <h3 class="text-center" style="margin: 40px auto 20px;">水果识别</h3>
  <div class="container">
    <form id="myForm" role="form" style="max-width: 330px;margin: auto;">
      <div class="form-group">
        <label>请选择图片</label>
        <div class="imgbox">
          <span class="glyphicon glyphicon-folder-open"></span>
          <img src="">
          <input type="file" name="iamge" required>
        </div>
        <div class="help-block with-errors">只能识别苹果、香蕉、葡萄、橘子、梨</div>
      </div>
      <div class="form-group">
        <label for="model">选择模型</label>
        <select class="form-control" id="model" name="model" required>
          <option value="">--请选择--</option>
          <option value="0">机器学习-SVM-sklearn</option>
          <option value="1">深度学习-PaddlePaddle-自定义模型</option>
          <option value="2">深度学习-PaddlePaddle-VGG模型</option>
        </select>
        <div class="help-block with-errors"></div>
      </div>
      <button type="submit" id="submit" class="btn btn-primary btn-block" data-loading-text="识别中..."
        style="margin-top: 30px;">开始识别</button>
      <div class="form-group">
        <label></label>
        <input id="result" class="form-control text-center" readonly placeholder="识别结果">
        <div class="help-block">只能识别苹果、香蕉、葡萄、橘子和梨</div>
      </div>
    </form>
  </div>

  <!-- jQuery (Bootstrap 的所有 JavaScript 插件都依赖 jQuery，所以必须放在前边) -->
  <script src="jquery.min.js"></script>
  <!-- 加载 Bootstrap 的所有 JavaScript 插件。你也可以根据需要只加载单个插件。 -->
  <script src="bootstrap.min.js"></script>
</body>

</html>